set more off
clear all

*MAC OR PC
*If PC
local m "G:\My Drive"
local s "\"
*If MAC
*local m "/Users/antonio/Google Drive"
*local s "/"


*Define Directories
local dir "`m'`s'Papers`s'Min Wage LLM" //Insert your directory path
local naicsdir "`dir'`s'xwalks`s'ind`s'naics`s'"


*NAICS12_NAICS07.DTA
use "`naicsdir'naics12_naics07_BRIDGE.dta", clear
ren naics2012 naics12
gen naics07= int(naics2007bdg/100)
drop if naics07==0
bys naics12: egen estabtot=total(estab)
bys naics12: egen emptot=total(emp)
gen weightestab= estab/estabtot
gen weightemp= emp/emptot
gen weight=weightemp
bys naics12: egen sum1=total(weight)
corr weightestab weightemp
keep naics12 naics07 weight
save "`naicsdir'naics12_naics07.dta", replace


